package com.zhx.business.repository.spec;

import com.zhx.business.entity.Product;
import com.zhx.business.repository.dto.ProductCondition;
import com.zhx.util.support.QueryWraper;
import com.zhx.util.support.ZhxSpecification;

public class ProductSpec extends ZhxSpecification<Product, ProductCondition> {

    public ProductSpec(ProductCondition condition) {
        super(condition);
    }

    @Override
    protected void addCondition(QueryWraper<Product> queryWraper) {
        addInCondition(queryWraper, "idList","uid");
        addLessThanCondition(queryWraper,"maxRawardRate","rewardRate");
        addGreaterThanCondition(queryWraper,"minRawardRate","rewardRate");
        addInCondition(queryWraper,"statusList","status");
    }
}
